package com.zhiyou10.crowdfunding.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou10.crowdfunding.service.ITrackingService;
import com.zhiyou10.crowdfunding.vo.Tracking;
import com.zhiyou10.crowdfunding.vo.mapper.TrackingMapper;
@Service
public class TrackingServiceImpl implements ITrackingService{

	@Autowired
	private TrackingMapper mapper;
	@Override
	public boolean add(Tracking vo) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doCreate(vo);
	}

	@Override
	public boolean edit(Tracking vo) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.doUpdate(vo);
	}

	@Override
	public Tracking get(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findBy(id);
	}

	@Override
	public Tracking getOne(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findById(id);
	}

	@Override
	public List<Tracking> lists(String name) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findByName(name);
	}

	@Override
	public List<Tracking> list(Integer usId) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Tracking> list1() throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAll();
	}

	@Override
	public Long findAllCount() throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllCount();
	}

	@Override
	public List<Tracking> findAllSplit(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return this.mapper.findAllSplit(map);
	}

}
